import request from '@/utils/request';

// 完善个人信息
export const updateUserApi = (data) => request.post('/user/update', data);

// 根据用户id获取个人信息
export const getUserByIdApi = (data) => request.get(`/user/${data}`);

// 查询用户关注的所有用户
export const getUserFollowApi = (data) => request.get(`/user/getAllFollow/?userId=${data}`);

// 查询用户所有的粉丝
export const getAllFansApi = (data) => request.get(`/user/getAllFans/?userId=${data}`);

// 用户关注其他用户
export const followUserApi = (data) => request.post('/user/follow', data);

// 查询用户是否关注
export const isFollowApi = (userId, followId) => request.get(`/user/isFollow?userId=${userId}&followId=${followId}`);

// 每日签到
export const signApi = (userId) => request.get(`/user/sign/${userId}`);

// 增加积分
export const addScoreApi = (data) => request.post('/user/addScore', data);

// 获取用户积分排行榜
export const getUserRankApi = () => request.get('/user/getUserRank');
